﻿//===================================================================================
// Copyright (c) Ryan Garrett.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===================================================================================

using Caffeine.Core.Test.TestModel;

namespace Caffeine.Core.Test.TestModel
{
    public class ModelForFactoryTesting : ModelBase
    {
        private readonly ModelProperty<ModelBase> _child;
 
        public ModelForFactoryTesting()
        {
            _child = RegisterProperty<ModelBase>("Child");
        }

        protected override void OnInitialized()
        {
            base.OnInitialized();
            Child.Value = CreateModel<ModelA>();
        }

        public ModelProperty<ModelBase> Child
        {
            get
            {
                return _child;
            }
        }
    }
}